import api_byte from "./api_byte"
//数据类型
export default class O extends api_byte {
    public static luaFalse   =        -128		//索引为false
    public static luaTrue    =    	  -127		//索引为true
    public static luaInt08    =    	  -126		//int8
    public static luaInt16    =    	  -125		//int16
    public static luaInt24    =    	  -124		//int24
    public static luaInt32    =    	  -123		//int32
    public static luaInt40    =    	  -122		//int40
    public static luaInt48    =    	  -121		//int48
    public static luaInt56    =    	  -120		//int56
    public static luaInt64    =    	  -119		//int64		
    public static luaFloat   =        -118		//double
    public static luaString  =        -117		//字符串类型
    public static luaLeft	 =        -116		//{
    public static luaRigh	 =        -115		//}
    public static luaMini	 =        -128		//开始
    public static luaMaxi	 =        -115		//结束

    //是否-[0~14]-[-128~-115]
    public static IS_NV(t:number):boolean{
        if(false == O.IfFloat(t)){
            return (t >= 0 && t <= (255 - (O.luaMaxi - O.luaMini + 1)));
        }
        return false
    }

    //是否-[-116~127]
    public static IS_NT(t:number):boolean{
        return (t > O.luaMaxi && t <= 127);
    }

    //得到-[-128~-115]
    public static AS_NV(t:number):number{
        return (t - O.luaMaxi - 1);
    }

    //得到-[-116~127]
    public static AS_NT(t:number):number{
        return (t + O.luaMaxi + 1);
    }

}